package cn.rkylin.oms.warehouseDocking.dao;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import cn.rkylin.core.IDataBaseFactory;
import cn.rkylin.oms.warehouseDocking.domain.QmInventoryQuery;

/**
 * QmInventoryQuery数据访问接口实现
 * 
 * @author jipengcheng
 * @created 2017年10月18日
 */
@Repository("iQmInventoryQueryDAO")
public class QmInventoryQueryDAOImpl implements IQmInventoryQueryDAO {

    @Autowired
    protected IDataBaseFactory dao;

    private static final String SelectByPrimaryKeyQmInventoryQueryId = "selectByPrimaryKeyQmInventoryQueryId";
    private static final String InsertSelectiveQmInventoryQuery = "insertSelectiveQmInventoryQuery";
    private static final String UpdateByPrimaryKeySelectiveQmInventoryQuery = "updateByPrimaryKeySelectiveQmInventoryQuery";

    /**
     * 查询ID
     */
    @Override
    public String selectByPrimaryKeyQmInventoryQueryId(Map<String, Object> reqMap) throws Exception {
        String result = (String) dao.find(SelectByPrimaryKeyQmInventoryQueryId, reqMap);
        return result;
    }

    /**
     * 插入
     */
    @Override
    public int insertSelectiveQmInventoryQuery(QmInventoryQuery qmInventoryQuery) throws Exception {
        int iRtn = dao.insert(InsertSelectiveQmInventoryQuery, qmInventoryQuery);
        return iRtn;
    }

    /**
     * 更新
     */
    @Override
    public int updateByPrimaryKeySelectiveQmInventoryQuery(QmInventoryQuery qmInventoryQuery) throws Exception {
        int iRtn = dao.update(UpdateByPrimaryKeySelectiveQmInventoryQuery, qmInventoryQuery);
        return iRtn;
    }

}
